#ifndef KYLIN_PRINTER_COMMON_H
#define KYLIN_PRINTER_COMMON_H

#include <QString>
#include <QStringList>

#define QTC(x) (qstringTochar(x))
#   ifndef GS_THEME_PERSONALISE
#       define GS_THEME_PERSONALISE "org.ukui.control-center.personalise"
#   endif

#   ifndef TRANSPARENCY
#       define TRANSPARENCY "transparency"
#   endif

#   ifndef TEST_PRINTER_PAGE_PATH
#       define TEST_PRINTER_PAGE_PATH "/usr/share/cups/data/testprint"
#   endif

enum CheckRes{
    CHECK_FALSE = 0,
    MAINWINDOW,
    POPWINDOW,
    DEBUG,
};

enum class PopWinStatus : int
{
    HIDE = 0,
    INSTALLING,
    INSTALL_SUCCESS,
    INSTALL_FAIL,
};

CheckRes checkCommand(const QStringList &command);

void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);

QString getRetFromCommand(const QStringList &command);

void runCommand(const QStringList &command);

const char *qstringTochar(const QString &qstr);

QString getUserName();

bool isAdministratorUser();
#endif // KYLIN_PRINTER_COMMON_H